package org.agile4j.patterns.command.macros;

import java.io.Serializable;

public class DuckCommand implements Command, Serializable {

	private static final long serialVersionUID = -4614156649275228804L;
	/**
	 * 持有具体做菜的厨师对象
	 */
	private CookApi cookApi = null ;
	private int tableNum ;
	
	public DuckCommand(int tableNum) {
		this.tableNum = tableNum ;
	}
	
	/**
	 * 设置具体做菜的厨师对象
	 * @param cookApi
	 */
	@Override
    public void setCookApi(CookApi cookApi){
		this.cookApi = cookApi ;
	}
	
	@Override
	public void execute() {
		this.cookApi.cook(tableNum, "北京烤鸭");
	}

	@Override
	public int getTableNum() {
		return this.tableNum;
	}

}
